<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<body>
<p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=13278">bug 13278</a>: REGRESSION: cannot change SELECT option.</p>
<form>
<select size="1">
  <option>FAILURE: script didn't run</option>
  <option>FAILURE</option>
  <option>SUCCESS</option>
</select>
<select size="3">
  <option>FAILURE: script didn't run</option>
  <option>FAILURE</option>
  <option>SUCCESS</option>
</select>
</form>
<div id=result></div>
<script>
test(() => {
  document.forms[0].elements[0].options[1].selected = true;
  document.forms[0].elements[1].options[1].selected = true;

  document.forms[0].elements[0].options[2].selected = true;
  document.forms[0].elements[1].options[2].selected = true;
  assert_equals(document.forms[0].elements[0].value, 'SUCCESS');
  assert_false(document.forms[0].elements[1].options[1].selected);
});
</script>
</body>
